# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit eutils

DESCRIPTION="Low level runtime library for the D programming language "

HOMEPAGE="http://www.digitalmars.com/d/"
SRC_URI="http://ftp.digitalmars.com/dmd.2.055.zip"

LICENSE="DMD"
SLOT="2"
KEYWORDS="~x86 ~amd64"
IUSE=""
EAPI="2"

RESTRICT="mirror"

PDEPEND="dev-lang/dmd"

S="${WORKDIR}/dmd2/src/druntime"

src_unpack() {
	unpack ${A}
}

src_compile() {
	make -f posix.mak || die "make failed"
}

src_install() {
	dolib.a "${S}/lib/libdruntime.a" || die "Install failed"
	dodir /usr/include/druntime
	mv "${S}/import"/* "${D}/usr/include/druntime/" || die "Install failed"
}
